conf: ignore some more special-cased functions
authorFelix Krull <f_krull@gmx.de>
Wed, 26 Aug 2020 19:50:43 +0000 (21:50 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:56 +0000 (12:53 -0400)
rust-bindings/rust/conf/ostree.toml
rust-bindings/rust/src/auto/repo.rs
rust-bindings/rust/src/auto/versions.txt
rust-bindings/rust/sys/src/auto/versions.txt

index 775e8ee75a06ea773c9ab55c0d93730aa2dac463..aeb7734ad0008f686852d91330a2c90d61903f94 100644 (file)
@@ -139,8 +139,8 @@ status = "generate"
 name = "OSTree.Repo"
 status = "generate"
     [[object.function]]
-    # [FAIL] this one generates a guchar** incorrectly
-    name = "write_content_async"
+    # [MANUAL] we special-case the checksum value
+    pattern = "write_content|write_content_async|write_metadata|write_metadata_async"
     ignore = true
 
     [[object.function]]
index ed5ff42aabce21d975c33da19be892371f118ac2..7e37a713f91981342a1289b1124b0d5bf679c1e4 100644 (file)
@@ -903,18 +903,6 @@ impl Repo {
         }
     }
 
-    //pub fn write_content<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(&self, expected_checksum: Option<&str>, object_input: &P, length: u64, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&Q>) -> Result<(), glib::Error> {
-    //    unsafe { TODO: call ostree_sys:ostree_repo_write_content() }
-    //}
-
-    pub fn write_content_trusted<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(&self, checksum: &str, object_input: &P, length: u64, cancellable: Option<&Q>) -> Result<(), glib::Error> {
-        unsafe {
-            let mut error = ptr::null_mut();
-            let _ = ostree_sys::ostree_repo_write_content_trusted(self.to_glib_none().0, checksum.to_glib_none().0, object_input.as_ref().to_glib_none().0, length, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
-            if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
-        }
-    }
-
     pub fn write_dfd_to_mtree<P: IsA<MutableTree>, Q: IsA<gio::Cancellable>>(&self, dfd: i32, path: &str, mtree: &P, modifier: Option<&RepoCommitModifier>, cancellable: Option<&Q>) -> Result<(), glib::Error> {
         unsafe {
             let mut error = ptr::null_mut();
@@ -931,51 +919,6 @@ impl Repo {
         }
     }
 
-    //pub fn write_metadata<P: IsA<gio::Cancellable>>(&self, objtype: ObjectType, expected_checksum: Option<&str>, object: &glib::Variant, out_csum: /*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, cancellable: Option<&P>) -> Result<(), glib::Error> {
-    //    unsafe { TODO: call ostree_sys:ostree_repo_write_metadata() }
-    //}
-
-    //pub fn write_metadata_async<P: IsA<gio::Cancellable>, Q: FnOnce(Result</*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, glib::Error>) + Send + 'static>(&self, objtype: ObjectType, expected_checksum: Option<&str>, object: &glib::Variant, cancellable: Option<&P>, callback: Q) {
-    //    unsafe { TODO: call ostree_sys:ostree_repo_write_metadata_async() }
-    //}
-
-    //
-    //pub fn write_metadata_async_future(&self, objtype: ObjectType, expected_checksum: Option<&str>, object: &glib::Variant) -> Pin<Box_<dyn std::future::Future<Output = Result</*Unimplemented*/FixedArray TypeId { ns_id: 0, id: 3 }; 32, glib::Error>> + 'static>> {
-
-        //let expected_checksum = expected_checksum.map(ToOwned::to_owned);
-        //let object = object.clone();
-        //Box_::pin(gio::GioFuture::new(self, move |obj, send| {
-        //    let cancellable = gio::Cancellable::new();
-        //    obj.write_metadata_async(
-        //        objtype,
-        //        expected_checksum.as_ref().map(::std::borrow::Borrow::borrow),
-        //        &object,
-        //        Some(&cancellable),
-        //        move |res| {
-        //            send.resolve(res);
-        //        },
-        //    );
-
-        //    cancellable
-        //}))
-    //}
-
-    pub fn write_metadata_stream_trusted<P: IsA<gio::InputStream>, Q: IsA<gio::Cancellable>>(&self, objtype: ObjectType, checksum: &str, object_input: &P, length: u64, cancellable: Option<&Q>) -> Result<(), glib::Error> {
-        unsafe {
-            let mut error = ptr::null_mut();
-            let _ = ostree_sys::ostree_repo_write_metadata_stream_trusted(self.to_glib_none().0, objtype.to_glib(), checksum.to_glib_none().0, object_input.as_ref().to_glib_none().0, length, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
-            if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
-        }
-    }
-
-    pub fn write_metadata_trusted<P: IsA<gio::Cancellable>>(&self, objtype: ObjectType, checksum: &str, variant: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error> {
-        unsafe {
-            let mut error = ptr::null_mut();
-            let _ = ostree_sys::ostree_repo_write_metadata_trusted(self.to_glib_none().0, objtype.to_glib(), checksum.to_glib_none().0, variant.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error);
-            if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
-        }
-    }
-
     pub fn write_mtree<P: IsA<MutableTree>, Q: IsA<gio::Cancellable>>(&self, mtree: &P, cancellable: Option<&Q>) -> Result<gio::File, glib::Error> {
         unsafe {
             let mut out_file = ptr::null_mut();
index d08ef3b9ca0f875cec87ab322fad8337f98c659c..518b4e22edd056958802b6966069fcba00ed909a 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)
+from gir-files (https://github.com/gtk-rs/gir-files @ 26bb987)
index d08ef3b9ca0f875cec87ab322fad8337f98c659c..518b4e22edd056958802b6966069fcba00ed909a 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1)
-from gir-files (https://github.com/gtk-rs/gir-files @ 7815425)
+from gir-files (https://github.com/gtk-rs/gir-files @ 26bb987)